package study.intconsulting.services;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import study.intconsulting.transform.Trans;
import study.intconsulting.vo.PcInfo;

public class RayService2 implements ServiceExecuter {
	
	public PcInfo execute(PcInfo pi) throws Exception {
				
		Trans trans = new Trans();
		pi = trans.mh(pi);
		
		FileOutputStream fos = null;
		
		try{
			
			fos = new FileOutputStream("C:\\int.txt");

			String message = pi.toString();
			System.out.println(pi.toString());
			
			fos.write(message.getBytes());
			
			
		}catch(FileNotFoundException fnfe){
			fnfe.printStackTrace();
		}catch(IOException ie){
			ie.printStackTrace();
		}finally{
			try{
				if(fos!=null) fos.close();
			}catch(IOException ioe){
				ioe.printStackTrace();
			}
		}
		
		return pi;
		
	}
	

}
